package com.hmall.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.hmall.user.pojo.Adderss;
import com.hmall.user.pojo.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;


public interface UserMapper extends BaseMapper<User> {


    @Select("select * from tb_address where user_id=#{userId}")
    List<Adderss> selectAddressList(Long userId);


    @Select("select * from tb_address where id=#{id}")
    Adderss findAddress(Long id);


    @Select("select * from tb_user where id = #{id}")
    User findUser(Long id);

}
